﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// Base_ServerInfo数据模型对象
    /// </summary>
    [Serializable]
    public partial class Base_ServerInfoMod
    {
        /// <summary>
        /// 初始化Base_ServerInfo数据模型对象
        /// </summary>
        public Base_ServerInfoMod()
        {
            
        }
        /// <summary>
        /// 初始化Base_ServerInfo数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="caption">Caption</param>
        /// <param name="paras">paras</param>
        public Base_ServerInfoMod(string iD,string caption,string paras)
        {
            //给ID字段赋值
            this.ID = iD;
            //给Caption字段赋值
            this.Caption = caption;
            //给paras字段赋值
            this.Paras = paras;
        }
        
		//属性存储数据的变量
        private string _iD;
        private string _caption;
        private string _paras;
        
        /// <summary>
        /// ID
        /// </summary>
        public string ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// Caption
        /// </summary>
        public string Caption
        {
            get { return this._caption; }
            set { this._caption = value; }
        }
        /// <summary>
        /// paras
        /// </summary>
        public string Paras
        {
            get { return this._paras; }
            set { this._paras = value; }
        }
        
        /// <summary>
        /// 对比两个Base_ServerInfo数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的Base_ServerInfo数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成Base_ServerInfo数据模型对象
            Base_ServerInfoMod base_ServerInfoMod = obj as Base_ServerInfoMod;
            //判断是否转换成功
            if (base_ServerInfoMod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == base_ServerInfoMod.ID &&
                //判断Caption是否一致
                this.Caption == base_ServerInfoMod.Caption &&
                //判断paras是否一致
                this.Paras == base_ServerInfoMod.Paras;
        }
        /// <summary>
        /// 将当前Base_ServerInfo数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将Base_ServerInfo数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                (this.ID == null ? 2147483647 : this.ID.GetHashCode()) ^
                //将Caption进行按位异或运算处理
                (this.Caption == null ? 2147483647 : this.Caption.GetHashCode()) ^
                //将paras进行按位异或运算处理
                (this.Paras == null ? 2147483647 : this.Paras.GetHashCode());
        }
        /// <summary>
        /// 将当前Base_ServerInfo数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前Base_ServerInfo数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID + "," +
                //将Caption转换成字符串
                this.Caption + "," +
                //将paras转换成字符串
                this.Paras +
                "]";
        }
    }
}
